//
//  LcSecurityCenter.h
//  18Birdies
//
//  Created by Lc on 15/3/20.
//  Copyright (c) 2015年 Lc. All rights reserved.
//

#import "LcSingleton.h"

@interface LcSecurityCenter : LcSingleton

- (NSString*)base64Encode:(NSData*)data;
- (NSData*)base64Decode:(NSString*)string;

- (NSString*)md5:(NSData*)data;
- (NSString*)sha1:(NSData*)data;

- (NSData*)randomAes128Key;

- (NSData*)encrypt:(NSData*)data withAes128Key:(NSData*)aesKey iv:(NSString*)iv;
- (NSData*)decrypt:(NSData*)data withAes128Key:(NSData*)aesKey iv:(NSString*)iv;

- (NSData*)encryptString:(NSString*)string
           withAes128Key:(NSData*)aesKey
                      iv:(NSString*)iv;
- (NSString*)decryptData:(NSData*)data
           withAes128Key:(NSData*)aesKey
                      iv:(NSString*)iv;

- (NSData*)encrypt:(NSData*)data withRsaPubicKey:(NSString*)rsaPublicKeyString;

- (NSData*)encryptString:(NSString*)string
         withRsaPubicKey:(NSString*)rsaPublicKeyString;

- (NSString*)generateUUID;

@end
